from PyQt5.QtGui import QImage,QColor

img = QImage('test2.png')
print(img.format())
# Format_ARGB32
